import {
  createStore,
  applyMiddleware,
} from 'redux'
import thunk from 'redux-thunk' // 用于处理异步 action
import logger from 'redux-logger' // 用于打印action日志
import rootReducer from '../reducers'

// 根据根 reducer 创建 store 对象
export default createStore(
  rootReducer,
  applyMiddleware(thunk, logger)
)
